package hutool;

import cn.hutool.core.util.CharsetUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.crypto.asymmetric.KeyType;
import cn.hutool.crypto.asymmetric.RSA;
import cn.hutool.http.HttpRequest;
import cn.hutool.json.JSONUtil;

public class HelloWorld {
    public static void main(String[] args){
        String secret=args[0];
        String spk=args[1];

        RSA rsa=new RSA(null,spk);
        String encryptSecret = rsa.encryptBase64(secret,CharsetUtil.CHARSET_UTF_8,KeyType.PublicKey);
        System.out.print(encryptSecret);
    }
}